page new
新しいページを作成します。alias: create
書式
cos page new <title> (--line <text> | --from-file <path>) --project <name>
フラグ
--line <text> — 本文行 (\n 区切りで複数行、複数回指定可)
--from-file <path> — ファイルから本文を読み込む (- で stdin)
--dry-run — 実行せずプレビューを表示
使用例
code:bash
# 1行の本文でページ作成
cos page new "新しいページ" --line "本文テキスト" --project myproject
# 複数行
cos page new "新しいページ" --line "1行目\n2行目\n3行目" --project myproject
# ファイルから作成
cos page new "新しいページ" --from-file ./content.txt --project myproject
# stdin から作成
echo "本文テキスト" | cos page new "新しいページ" --from-file - --project myproject
# dry-run で確認
cos page new "新しいページ" --line "本文" --project myproject --dry-run
関連ページ